Translation:

25. If any of you have not the means wherewith to wed free believing women they may wed believing girls from among those whom your right hands possess: and Allah hath full knowledge about your faith. Ye are one from another: wed them with the leave of their owners and give them their dowers according to what is reasonable: they should be chaste not lustful nor taking paramours: when they are taken in wedlock if they fall into shame their punishment is half that for free women. This (permission) is for those among you who fear sin; but it is better for you that ye practice self-restraint: and Allah is Oft-forgiving Most Merciful.

Notes (Tafseer)

540. That is, captives taken in a Jihad: If you seek such a person in marriage, do it from no base motives. Safeguard your faith, and see that she too does believe. In that case, after all, she is of the human brotherhood, and her condition is accidental and redeemable. If the slave bore a child to her master, she would become free.